﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace ZeroSum.Plugin.Authorization.Datas.Dto.In;

/// <summary>
///     Token请求DTO
/// </summary>
public class LoginDto
{
    /// <summary>
    ///     用户名
    /// </summary>
    /// <example>superAdmin</example>
    [Required(ErrorMessage = "用户名不能为空")]
    [MinLength(5, ErrorMessage = "用户名不能少于5位字符")]
    [DefaultValue("superAdmin")]
    public string? Account { get; set; }

    /// <summary>
    ///     密码
    /// </summary>
    /// <example>123456</example>
    [Required(ErrorMessage = "密码不能为空")]
    [MinLength(5, ErrorMessage = "密码不能少于5位字符")]
    [DefaultValue("123456")]
    public string? Password { get; set; }
}